package com.glory.brepda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.brepda.R;
import com.glory.brepda.entity.LotInfoEntity;

import java.util.List;

/**
 * FileName: LotShelvesLotInfoAdapter
 * Author: XJH
 * Date: 2020/8/6 14:05
 * Description:
 * History:
 */

public class FixtureBindAdapter extends BaseQuickAdapter<LotInfoEntity, BaseViewHolder> {
    public FixtureBindAdapter(@Nullable List<LotInfoEntity> data) {
        super(R.layout.adapter_fixturebind, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, LotInfoEntity item) {
        helper.setText(R.id.tvLot,item.getLOT().getLOTID());
        helper.setText(R.id.tvCircuit,item.getPRODUCTMODEL());
        helper.getView(R.id.ivDelete).setOnClickListener(view -> {
            remove(helper.getAdapterPosition());
            notifyDataSetChanged();
        });
    }
}
